package cn.congzhou.crm.common.vo;

import lombok.*;

import java.util.List;

/**
 * layui table页面表格规定的数据格式
 */
@Getter@Setter
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class PageTableData<T> {
    /**
     * 状态码
     */
    private int code;
    /**
     * 错误信息
     */
    private String msg;
    /**
     * 数据总记录数
      */
    private Long count;
    /**
     * 数据
     */
    private List<T> data;

    public PageTableData(Long count,List<T> data){
        this.code = 0;
        this.count = count;
        this.data = data;
    }

    public PageTableData(int code,String msg){
        this.code = code;
        this.msg = msg;
    }


}
